<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>检测内容</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="众测天下@zhongcetianxia.com">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-transform"/>
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/??sm.min.css,sm-extend.min.css">
<link rel="stylesheet" type="text/css" href="../../Public/template/green/css/webapp.css" />
<!--<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>-->
<script src="http://wximg.qq.com/wxp/libs/wxmoment/0.0.4/wxmoment.min.js"></script>
</head>
<body>
<div class="page" id="page-no-infinite-scroll">
    <header class="bar bar-nav bg-main bg-inverse">
        <a class="icon icon-left pull-left back"></a>
        <h1 class="title color-white fs-2x fw-bold">选择检测内容</h1>
    </header>
    <div class="content">
        <div class="list-block media-list mt-no">
            <ul class="list-container">
                <li>
                    <label class="label-checkbox item-link item-content" data-name="黄曲霉毒素" data-id="17" data-price="480">
                        <input class="checkbox" type="checkbox" name="checkbox" id="17" data-name="黄曲霉毒素" data-id="17" data-price="480">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">黄曲霉毒素</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥480元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="三聚氰胺" data-id="18" data-price="420">
                        <input class="checkbox" type="checkbox" name="checkbox" id="18" data-name="三聚氰胺" data-id="18" data-price="420">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">三聚氰胺</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥420元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="孔雀石" data-id="19" data-price="400">
                        <input class="checkbox" type="checkbox" name="checkbox" id="19" data-name="孔雀石" data-id="19" data-price="400">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">孔雀石</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥400元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="重金属" data-id="20" data-price="265">
                        <input class="checkbox" type="checkbox" name="checkbox" id="20" data-name="重金属" data-id="20" data-price="265">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">重金属</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥265元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="农/兽药残留" data-id="21" data-price="400">
                        <input class="checkbox" type="checkbox" name="checkbox" id="21" data-name="农/兽药残留" data-id="21" data-price="400">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">农/兽药残留</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥400元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="甲醛" data-id="22" data-price="280">
                        <input class="checkbox" type="checkbox" name="checkbox" id="22" data-name="甲醛" data-id="22" data-price="280">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">甲醛</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥280元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="亚硝酸盐" data-id="23" data-price="240">
                        <input class="checkbox" type="checkbox" name="checkbox" id="23" data-name="亚硝酸盐" data-id="23" data-price="240">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">亚硝酸盐</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥240元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="致癌物" data-id="24" data-price="500">
                        <input class="checkbox" type="checkbox" name="checkbox" id="24" data-name="致癌物" data-id="24" data-price="500">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">致癌物</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥500元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="色素" data-id="25" data-price="250">
                        <input class="checkbox" type="checkbox" name="checkbox" id="25" data-name="色素" data-id="25" data-price="250">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">色素</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥250元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="食品添加剂" data-id="26" data-price="480">
                        <input class="checkbox" type="checkbox" name="checkbox" id="26" data-name="食品添加剂" data-id="26" data-price="480">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">食品添加剂</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥480元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="微生物" data-id="27" data-price="500">
                        <input class="checkbox" type="checkbox" name="checkbox" id="27" data-name="微生物" data-id="27" data-price="500">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">微生物</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥500元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="常规理化" data-id="28" data-price="380">
                        <input class="checkbox" type="checkbox" name="checkbox" id="28" data-name="常规理化" data-id="28" data-price="380">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">常规理化</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥380元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="硼砂" data-id="35" data-price="420">
                        <input class="checkbox" type="checkbox" name="checkbox" id="35" data-name="硼砂" data-id="35" data-price="420">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">硼砂</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥420元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="过氧化值" data-id="36" data-price="160">
                        <input class="checkbox" type="checkbox" name="checkbox" id="36" data-name="过氧化值" data-id="36" data-price="160">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">过氧化值</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥160元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="挥发性盐基氮" data-id="37" data-price="130">
                        <input class="checkbox" type="checkbox" name="checkbox" id="37" data-name="挥发性盐基氮" data-id="37" data-price="130">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">挥发性盐基氮</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥130元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="菌落总数" data-id="39" data-price="150">
                        <input class="checkbox" type="checkbox" name="checkbox" id="39" data-name="菌落总数" data-id="39" data-price="150">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">菌落总数</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥150元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="二氧化硫" data-id="40" data-price="280">
                        <input class="checkbox" type="checkbox" name="checkbox" id="40" data-name="二氧化硫" data-id="40" data-price="280">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">二氧化硫</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥280元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="吊白块" data-id="41" data-price="160">
                        <input class="checkbox" type="checkbox" name="checkbox" id="41" data-name="吊白块" data-id="41" data-price="160">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">吊白块</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥160元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
                <li>
                    <label class="label-checkbox item-link item-content" data-name="其他" data-id="42" data-price="300">
                        <input class="checkbox" type="checkbox" name="checkbox" id="42" data-name="其他" data-id="42" data-price="300">
                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">其他</div>
                                <div class="item-after"><span class="color-red pr-0x br">￥300元</span><a href="../Harm/brief.html" class="pl-0x color-red">危害简介</a></div>
                            </div>
                        </div>
                    </label>
                </li>
            </ul>
        </div>
        <div class="pv-1x"></div>
        <div class="flexbox fixed-bottom bg-grey">
            <div class="flexbox-item flexbox-ratio7">
                <div class="ph-1x lh-big">检测金额：<label style="color:red">￥</label><label id="price_total" style="color:red"></label></div>
            </div>
            <div class="flexbox-item flexbox-ratio3"><button class="button button-big button-fill bg-main w-full r-no" onclick="javascript:history.go(-1);">确定</button></div>
        </div>
    </div>
</div>
<script type="text/javascript">var basePath="../../Public/template/green";</script>
<script type="text/javascript" src="../../Public/template/green/js/loading.js"></script>
<script type="text/javascript" src="../../Public/template/green/sui/sm.min.js"></script>
<script type="text/javascript" src="../../Public/template/green/js/webapp.js"></script>
<script>
    $(function(){

        sessionStorage.firstenter = 1;
        //判断是否有选择了产品分类

        var  packageids = sessionStorage.packageids;
        if(packageids=="" || typeof(packageids)=="undefined") {
            alert("请先选择产品分类");
            top.location.href="food_category.html";
        } else {
            //对产品分类绑定的项目进行选中
            var packageids_arr;
            packageids_arr = packageids.split(",");
            $.each(packageids_arr,function(i,n){
                $("#"+n).attr("checked",true);
            });

            //console.log($(".blend-checkbox-checked").html());

            var price=0;
            var name="";
            var pid="";

            $(".checkbox").each(function(){
                //累加数据
                if(this.checked == true) {
                    price += parseInt($(this).attr('data-price'));
                    name += ($(this).attr('data-name') + ",");
                    pid += ($(this).attr('data-id') + ",");
                }

            });
            sessionStorage.price= price;
            sessionStorage.packagename = name.substring(0,name.length-1);
            sessionStorage.packageid = pid.substring(0,pid.length-1);
            $("#price_total").text(price);
        }

        $(".checkbox").change(function(){
            //获取当前一共有多少选中
            var price=0;
            var name="";
            var pid="";
            $(".checkbox").each(function(){
                //累加数据
                if(this.checked == true) {
                    price += parseInt($(this).attr('data-price'));
                    name += ($(this).attr('data-name') + ",");
                    pid += ($(this).attr('data-id') + ",");
                }
            });
            sessionStorage.price= price;
            sessionStorage.packagename = name.substring(0,name.length-1);
            sessionStorage.packageid = pid.substring(0,pid.length-1);
            $("#price_total").text(price);
        });
    });

</script>
</body>
</html>
